/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gm.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Med EL MOUDDENE
 */
@Embeddable
public class ReeducationConcernantPersonnePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_PERSONNE")
    private int idPersonne;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_TYPEREEDUCATION")
    private int idTypereeducation;

    public ReeducationConcernantPersonnePK() {
    }

    public ReeducationConcernantPersonnePK(int idPersonne, int idTypereeducation) {
        this.idPersonne = idPersonne;
        this.idTypereeducation = idTypereeducation;
    }

    public int getIdPersonne() {
        return idPersonne;
    }

    public void setIdPersonne(int idPersonne) {
        this.idPersonne = idPersonne;
    }

    public int getIdTypereeducation() {
        return idTypereeducation;
    }

    public void setIdTypereeducation(int idTypereeducation) {
        this.idTypereeducation = idTypereeducation;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idPersonne;
        hash += (int) idTypereeducation;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ReeducationConcernantPersonnePK)) {
            return false;
        }
        ReeducationConcernantPersonnePK other = (ReeducationConcernantPersonnePK) object;
        if (this.idPersonne != other.idPersonne) {
            return false;
        }
        if (this.idTypereeducation != other.idTypereeducation) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.gm.entities.ReeducationConcernantPersonnePK[ idPersonne=" + idPersonne + ", idTypereeducation=" + idTypereeducation + " ]";
    }
    
}
